package com.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * @Author: htj
 * @Date: 2021/10/6 0006 上午 2:05
 */
@WebFilter(urlPatterns = "/myFilter")//这里标明哪些路径会进入过滤器
public class MyFilter implements Filter {

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("**************已进入过滤器");
        chain.doFilter(request, response);
    }
}
